<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Label Elements - Screenbar Documentation</title>
	<link rel="stylesheet" type="text/css" media="screen" href="style.css">
</head>
<body>

<H1>Label Elements</H1>

<P>A label element displays text, either a configured string or a property of
the context's desk or task. Labels have the following options:</P>

<div id="configoption">
	Label elements inherit <a href="layout.html#common">common layout options</a>.
</div>

<div id="configoption" name="prefixAlignHoriz">
	<div id="prototype">(prefix)AlignHoriz [left|center|right]</div>
	<div id="defaultval">Default: center</div>
	<div id="description">
		Whether this text is left, center, or right-aligned. This alignment also
		determines the meaning of (prefix)X; the left side, center, or right side,
		respectively.
	</div>
</div>

<div id="configoption" name="prefixAlignVert">
	<div id="prototype">(prefix)AlignVert [top|center|bottom]</div>
	<div id="defaultval">Default: center</div>
	<div id="description">
		Whether this text is top, center, or bottom-aligned. This alignment also
		determines the meaning of (prefix)Y; the top, center, or bottom,
		respectively.
	</div>
</div>

<div id="configoption">
	<div id="prototype" name="prefixX">(prefix)X [coord]</div>
	<div id="prototype" name="prefixY">(prefix)Y [coord]</div>
	<div id="description">
		Where the edges of the text are. The default depends on alignment.
	</div>
</div>

<div id="configoption" name="prefixMinLength">
	<div id="prototype">(prefix)MinLength [int]</div>
	Default: 0
	<div id="description">
		The minimum length for this text. If the text is smaller than this, it will
		be expanded and the extra space left blank.
	</div>
</div>

<div id="configoption" name="prefixMaxLength">
	<div id="prototype">(prefix)MaxLength [int]</div>
	<div id="defaultval">Default: 250</div>
	<div id="description">
		The maximum length for this text. If the text is larger than this, it will
		be shortened and ellipses ('...') used at the end.
	</div>
</div>

<div id="configoption" name="prefixAllowAbbrev">
	<div id="prototype">(prefix)AllowAbbrev [bool]</div>
	<div id="defaultval">Default: false</div>
	<div id="description">
		Whether this label's text may be truncated to a length shorter than
		MaxLength to make room on the panel.
	</div>
</div>

<div id="configoption" name="prefixUseXStats">
	<div id="prototype">(prefix)UseXStats [bool]</div>
	<div id="defaultval">Default: false</div>
	<div id="description">
		If set, the XStatsClass module is loaded and the label's text is handled as
		an XStatsClass expression.
	</div>
</div>

<div id="configoption" name="prefixText">
	<div id="prototype">(prefix)Text [string]</div>
	<div id="defaultval">Default: .auto</div>
	<div id="description">
	</div>
</div>

<P>The label text can either be an arbitrary string, which is shown as-is, or a
special value starting with a dot.</P>

<ul id="namelist">
<li id="namelistitem" name="auto">
	<div id="itemname">.auto</div>
	<div id="itemdesc">
		If in the context of a task, the same as .taskname. Otherwise, the same as
		.desknum.
	</div>
<li id="namelistitem" name="desknum">
	<div id="itemname">.desknum</div>
	<div id="itemdesc">
		The number of the context's virtual desktop.
	</div>
<li id="namelistitem" name="taskname">
	<div id="itemname">.taskname</div>
	<div id="itemdesc">
		The window title of the context's task.
	</div>
<li id="namelistitem" name="cpu">
	<div id="itemname">.cpu</div>
	<div id="itemdesc">
		The percentage of the CPU that the context task is using. Requires the
		sbTrackProcesses option to be true.
	</div>
<li id="namelistitem" name="mem">
	<div id="itemname">.mem</div>
	<div id="itemdesc">
		The amount of memory (in kb) that the context task is using. Requires the
		sbTrackProcesses option to be true.
	</div>
</ul>

<P>Additionally, label elements respect all 
<a href="http://www.xdocs.ls-universe.info/dokuwiki/xpc/xPaintText">XPaintClass
PaintText options</a>.  Some of the more useful of these options are
(prefix)Font, (prefix)FontHeight
and (prefix)FontColor.</P>

<div id="navigation">
	<a href="icon.html">Previous Page</a>
	<a href="index.html">Index</a>
	<a href="minimap.html">Next Page</a>
</div>

</body>
</html>

